<template>
  <div class="swiper">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
          <van-swipe-item v-for="(item, index) in swiperData" :key="index" @click="selectSwipe(item)"><img v-lazy="`http://liufusong.top:8080${item.imgSrc}`" /></van-swipe-item>
      </van-swipe>
  </div>
</template>

<script>
export default {
  name: 'Swiper',
  props: {
    swiperData: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="less" scoped>
// 轮播图
    .my-swipe .van-swipe-item {
    height: 212px;
    line-height: 212px;
    text-align: center;
    background-color: rgb(228, 228, 228);
    img{
      width: 100%;
      height: 100%;
    }
  }
</style>
